home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Practical Internet Web Designer 86
/
PIWD86.iso
/
pc
/
contents
/
illustration
/
software
/
Installer
/
data1.cab
/
Program_Files
/
Presets
/
Scripts
/
Add Watermark.js
next >
Wrap
Text File
|
2001-11-29
|
676b
|
32 lines
// Add watermark to activeDocument
var docCount = documents.length;
var docCount = documents.length;
if (docCount == 0)
{
documents.add();
}
var docRef = documents[0];
var destLayerRef = docRef.layers.add();
destLayerRef.name = "Watermark";
var textRef = destLayerRef.textArtItems.add();
textRef.contents = "DRAFT";
textRef.opacity = 42;
var docHeight = docRef.height;
var docWidth = docRef.width;
textRef.height = docHeight/2;
textRef.width = docWidth;
textRef.rotate(45, undefined, undefined, undefined, undefined, Transformation.CENTER);
textRef.width = docWidth;
textRef.height = docHeight;
textRef.position = [0, docHeight];